import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import 'colors.dart';

class MyTextStyle {
  MyTextStyle._();

  static final snackBarTextStyle = TextStyle(
    color: Colors.white,
    fontSize: 14.sp,
    overflow: TextOverflow.fade,
  );

  static final appbarTitleTextStyle = TextStyle(
    color: MyColor.appbarTitleTextColor,
    fontSize: 18.sp,
    overflow: TextOverflow.fade,
  );
  static final firstLevelTitleTextStyle = TextStyle(
    color: MyColor.appbarTitleTextColor,
    fontSize: 24.sp,
    overflow: TextOverflow.fade,
  );
  static final secondLevelTitleTextStyle = TextStyle(
    color: MyColor.secondLevelTitleTextColor,
    fontSize: 14.sp,
    overflow: TextOverflow.fade,
  );
  static final tileTextStyle = TextStyle(
    color: MyColor.secondLevelTitleTextColor,
    fontSize: 14.sp,
    overflow: TextOverflow.fade,
  );

  static final tileSubtitleTextStyle = TextStyle(
    color: MyColor.subtextColor,
    fontSize: 14.sp,
    letterSpacing: 0,
    fontWeight: FontWeight.w500,
    overflow: TextOverflow.fade,
  );

  static final popTextStyle = TextStyle(
    color: MyColor.popTextColor,
    fontSize: 16.sp,
    fontWeight: FontWeight.w500,
    letterSpacing: 0,
    overflow: TextOverflow.fade,
  );
  static final dialogTitleTextStyle = TextStyle(
    color: MyColor.popTextColor,
    fontSize: 20.sp,
    fontWeight: FontWeight.w500,
    letterSpacing: 0,
    overflow: TextOverflow.fade,
  );
  static final dialogContentTextStyle = TextStyle(
    color: MyColor.popTextColor,
    fontSize: 16.sp,
    fontWeight: FontWeight.w400,
    letterSpacing: 0,
    overflow: TextOverflow.fade,
  );
  static final dialogButtonTextStyle = TextStyle(
    color: MyColor.mainColor,
    fontSize: 16.sp,
    fontWeight: FontWeight.w500,
    letterSpacing: 0,
    overflow: TextOverflow.fade,
  );
  static final tileTitleTextStyle = TextStyle(
    color: MyColor.leadingIconColor,
    fontSize: 16.sp,
    letterSpacing: 0,
    fontWeight: FontWeight.w500,
    overflow: TextOverflow.fade,
  );

  static final tileSubTitleTextStyle = TextStyle(
    color: MyColor.subtextColor,
    fontSize: 14.sp,
    letterSpacing: 0,
    fontWeight: FontWeight.w500,
    overflow: TextOverflow.fade,
  );

  static final buttonTextStyle = TextStyle(
    color: MyColor.leadingIconColor,
    fontSize: 14.sp,
    fontWeight: FontWeight.w500,
    letterSpacing: 0,
    overflow: TextOverflow.fade,
  );

  static const white = TextStyle(
    color: MyColor.white,
    overflow: TextOverflow.fade,
  );
  static const grey = TextStyle(
    color: MyColor.grey,
    overflow: TextOverflow.fade,
  );

  static final white15 = TextStyle(
    fontSize: 15.sp,
    color: MyColor.white,
    overflow: TextOverflow.fade,
  );
  static final white16 = TextStyle(
    fontSize: 16.sp,
    color: MyColor.white,
    overflow: TextOverflow.fade,
  );

  static final grey15 = TextStyle(
    fontSize: 15.sp,
    color: MyColor.grey,
    overflow: TextOverflow.fade,
  );
  static final grey14 = TextStyle(
    color: MyColor.grey,
    fontSize: 14.sp,
    overflow: TextOverflow.fade,
  );
  static final grey12 = TextStyle(
    color: MyColor.grey,
    fontSize: 12.sp,
    overflow: TextOverflow.fade,
  );
  static final grey2fs18 = TextStyle(
    fontSize: 18.sp,
    color: MyColor.grey2,
    overflow: TextOverflow.fade,
  );

  static final green15 = TextStyle(
    fontSize: 15.sp,
    color: MyColor.green,
    overflow: TextOverflow.fade,
  );
}

class MyEdge {
  MyEdge._();

  static final t24b40l16r16 =
      EdgeInsets.only(top: 24.h, left: 16.w, right: 16.w, bottom: 40.h);
  static final t50l16r16 = EdgeInsets.only(top: 50.h, right: 16.w, left: 16.w);
  static final h10 = EdgeInsets.symmetric(horizontal: 10.w);
  static final h16 = EdgeInsets.symmetric(horizontal: 16.w);
  static final h20 = EdgeInsets.symmetric(horizontal: 20.w);
  static final h24 = EdgeInsets.symmetric(horizontal: 24.w);
  static final h10v2 = EdgeInsets.symmetric(horizontal: 10.w, vertical: 2.h);
  static EdgeInsets h20t50 =
      EdgeInsets.only(left: 20.w, right: 20.w, top: 50.h);
  static final hb15 = EdgeInsets.only(left: 15.w, right: 15.w, bottom: 15.h);
  static final h22b12 = EdgeInsets.only(left: 22.w, right: 22.w, bottom: 12.h);
  static final h22b16 = EdgeInsets.only(left: 22.w, right: 22.w, bottom: 16.h);
  static final v10r20 = EdgeInsets.only(right: 20.w, top: 10.w, bottom: 10.w);
  static final a10 = EdgeInsets.all(10.w);
  static final a16 = EdgeInsets.all(16.w);
  static final v10 = EdgeInsets.symmetric(vertical: 10.w);
}

class MyBorderRadius {
  MyBorderRadius._();

  static final c4 = BorderRadius.circular(4.r);
  static final c5 = BorderRadius.circular(5.r);
  static final c8 = BorderRadius.circular(8.r);
  static final c10 = BorderRadius.circular(10.r);
  static final c11 = BorderRadius.circular(11.r);
  static final c12 = BorderRadius.circular(12.r);
  static final c16 = BorderRadius.circular(16.r);
  static final c20 = BorderRadius.circular(20.r);
  static final c22 = BorderRadius.circular(22.r);
  static final c24 = BorderRadius.circular(24.r);
}

class MySizedBox {
  MySizedBox._();

  static const shrink = SizedBox.shrink();
  static final h1 = SizedBox(height: 1.h);
  static final h2 = SizedBox(height: 2.h);
  static final h3 = SizedBox(height: 3.h);
  static final h4 = SizedBox(height: 4.h);
  static final h5 = SizedBox(height: 5.h);
  static final h6 = SizedBox(height: 6.h);
  static final h7 = SizedBox(height: 7.h);
  static final h8 = SizedBox(height: 8.h);
  static final h10 = SizedBox(height: 10.h);
  static final h12 = SizedBox(height: 12.h);
  static final h14 = SizedBox(height: 14.h);
  static final h15 = SizedBox(height: 15.h);
  static final h16 = SizedBox(height: 16.h);
  static final h18 = SizedBox(height: 18.h);
  static final h20 = SizedBox(height: 20.h);
  static final h25 = SizedBox(height: 25.h);
  static final h26 = SizedBox(height: 26.h);
  static final h28 = SizedBox(height: 28.h);
  static final h30 = SizedBox(height: 30.h);
  static final h34 = SizedBox(height: 34.h);
  static final h40 = SizedBox(height: 40.h);
  static final h50 = SizedBox(height: 50.h);
  static final h68 = SizedBox(height: 68.h);
  static final h80 = SizedBox(height: 80.h);
  static final h175 = SizedBox(height: 175.h);
  static final h380 = SizedBox(height: 380.h);
  static final h24 = SizedBox(
    height: MySize.topAndSecondTitleSpacing,
  );
  static final w4 = SizedBox(width: 4.w);
  static final w8 = SizedBox(width: 8.w);
  static final w10 = SizedBox(width: 10.w);
  static final w12 = SizedBox(width: 12.w);
  static final w14 = SizedBox(width: 14.w);
  static final w21 = SizedBox(width: 21.w);
  static final w24 = SizedBox(width: 24.w);
  static final w30 = SizedBox(width: 30.w);
  static final w70 = SizedBox(width: 70.w);
}

class MySize {
  MySize._();

  ///列表与边的间距
  static final listAndEdgeSpacing = 16.w;

  ///图标和文字的间距
  static final leadingAndTitleSpacing = 14.w;

  ///一级标题和二级标题的间距
  static final topAndSecondTitleSpacing = 24.h;
}
